package toubiao.domain.po.business;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.DynamicUpdate;

@Entity
@Table(name = "select_option") //对应保存的数据库名称
@DynamicUpdate(true)	
public class PoSelectOption {

	private int id;
	
	private String value;
	
	private String text;
	
	private PoSelect select;
	
	//分组
	private String groupName;
	
	//备注
	private String comment;
	
	//组排序
	private int seqOfGroup;
	
	//组内排序
	private int seqInGroup;

	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name = "ID")
	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}

	public String getText() {
		return text;
	}

	public void setText(String text) {
		this.text = text;
	}

	public String getComment() {
		return comment;
	}

	public void setComment(String comment) {
		this.comment = comment;
	}

	public int getSeqOfGroup() {
		return seqOfGroup;
	}

	public void setSeqOfGroup(int seqOfGroup) {
		this.seqOfGroup = seqOfGroup;
	}

	public int getSeqInGroup() {
		return seqInGroup;
	}

	public void setSeqInGroup(int seqInGroup) {
		this.seqInGroup = seqInGroup;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "select_id")
	public PoSelect getSelect() {
		return select;
	}

	public void setSelect(PoSelect select) {
		this.select = select;
	}
	
	public String getGroupName() {
		return groupName;
	}

	public void setGroupName(String groupName) {
		this.groupName = groupName;
	}

}

